widget-factory: Add a discontinuous GtkScale with marks
authorCarlos Soriano <carlos.sorian89@gmail.com>
Fri, 5 Dec 2014 10:09:56 +0000 (11:09 +0100)
committerCarlos Soriano <carlos.sorian89@gmail.com>
Fri, 5 Dec 2014 12:23:05 +0000 (13:23 +0100)
So designers can tweak the marks and developers can see how a
discontinuos scale is implemented.

https://bugzilla.gnome.org/show_bug.cgi?id=741117

demos/widget-factory/widget-factory.ui

index 7b7cee0751664b93338447e8787424a037a8ae51..1fe8a157a3ded55beab529770f5c76f7b723b18e 100644 (file)
     <property name="step_increment">1</property>
     <property name="page_increment">10</property>
   </object>
+  <object class="GtkAdjustment" id="adjustment3">
+    <property name="upper">4</property>
+    <property name="lower">0</property>
+    <property name="value">1</property>
+    <property name="step_increment">1</property>
+    <property name="page_increment">1</property>
+  </object>
   <object class="GtkAdjustment" id="pg_adjustment">
     <property name="upper">99</property>
     <property name="lower">1</property>
@@ -1260,6 +1267,29 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                             <property name="position">1</property>
                           </packing>
                         </child>
+                        <child>
+                          <object class="GtkScale" id="scale5">
+                            <property name="visible">True</property>
+                            <property name="can_focus">True</property>
+                            <property name="draw_value">False</property>
+                            <property name="has_origin">False</property>
+                            <property name="round_digits">0</property>
+                            <property name="adjustment">adjustment3</property>
+                            <property name="restrict_to_fill_level">False</property>
+                            <marks>
+                              <mark value="0" position="bottom"/>
+                              <mark value="1" position="bottom"/>
+                              <mark value="2" position="bottom"/>
+                              <mark value="3" position="bottom"/>
+                              <mark value="4" position="bottom"/>
+                            </marks>
+                          </object>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">True</property>
+                            <property name="position">2</property>
+                          </packing>
+                        </child>
                         <child>
                           <object class="GtkBox" id="box25">
                             <property name="visible">True</property>
@@ -1357,7 +1387,7 @@ Suspendisse feugiat quam quis dolor accumsan cursus.</property>
                           <packing>
                             <property name="expand">True</property>
                             <property name="fill">True</property>
-                            <property name="position">2</property>
+                            <property name="position">3</property>
                           </packing>
                         </child>
                       </object>